/*
 * @(#)AssVertex.java   09/12/30
 * 
 * Copyright (C) 2009 Ecole des Mines d'Ales
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Contact: yulinz88@gmail.com
 */



package fr.ema.arch3d.editor.ass;

import org.jgraph.graph.AttributeMap;
import org.jgraph.graph.DefaultGraphCell;

import javax.swing.tree.MutableTreeNode;

//~--- classes ----------------------------------------------------------------

/**
 * Class description
 *
 *
 * @version        1.0, 09/09/13
 * @author         Huaxi (Yulin) ZHANG
 */
public class AssVertex extends DefaultGraphCell {

    /** Field description */
    String vertexName;

    /**
     * the vertext itfP container, component or connector
     */
    String vertexType;

    /**
     * Creates an empty cell.
     */
    public AssVertex() {
        super(null);
    }

    /**
     * Creates a graph cell and initializes it with the specified user object.
     *
     * @param userObject an Object provided by the user that constitutes
     *                   the cell's data
     */
    public AssVertex(Object userObject) {
        super(userObject, null);
    }

    /**
     * Constructs a cell that holds a reference to the specified user object
     * and contains the specified array of children and sets default values
     * for the bounds attribute.
     *
     * @param userObject reference to the user object
     * @param storageMap the storage attribute map for this cell
     */
    public AssVertex(Object userObject, AttributeMap storageMap) {
        super(userObject, storageMap, null);
    }

    /**
     * Creates a graph cell and initializes it with the specified user object.
     * The GraphCell allows children only if specified.
     *
     * @param userObject an Object provided by the user that constitutes
     *                   the cell's data
     * @param storageMap the storage attribute map for this cell
     * @param children array of children
     */
    public AssVertex(Object userObject, AttributeMap storageMap, MutableTreeNode[] children) {
        super(userObject, storageMap, children);
    }

    /**
     * Method description
     *
     * @return  
     */
    public String getVertexType() {

        // TODO Auto-generated method stub
        return vertexType;
    }

    /**
     * Method description
     *
     * @param pt  
     */
    public void setVertexType(String pt) {

        // TODO Auto-generated method stub
        vertexType = pt;
    }

    /**
     * Method description
     *
     * @return  
     */
    public String getVertexName() {

        // TODO Auto-generated method stub
        return vertexName;
    }

    /**
     * Method description
     *
     * @param pn  
     */
    public void setVertexName(String pn) {

        // TODO Auto-generated method stub
        vertexName = pn;
    }
}
